{% extends 'account/base.html' %}

{% load i18n %}
{% load lbforum %}
{% load avatar_tags %}

{% block title %}
    {{ topic.subject }} - {{ block.super }}
{% endblock %}

{% block brd-page-id %}brd-profile-avatar{% endblock %}

{% block main_menu_avatar_class %}active{% endblock %}
{% block main_head %}{{ user }}'s profile : Avatar{% endblock %}
{% block main_subhead %}Set an avatar image to enhance your forum identity{% endblock %}

{% block account_main_content %}
	{% if form.errors %}
		<div class="ct-box error-box" id="req-msg">
			<p class="errornote"> Please correct the errors below.  </p>
			{{form.errors}}
		</div>
	{% endif %}
    <form enctype="multipart/form-data" method="POST" action="">
        <div class="hidden">
            {% csrf_token %}
        </div>
        <fieldset class="frm-group group1">
            <legend class="group-legend"><strong>Avatar</strong></legend>
            <div class="ct-set info-set set1">
                <div class="ct-box info-box">
                    <h3 class="hn ct-legend">Current avatar</h3>
                    <p>{% avatar user %}</p>
                </div>
            </div>
            <div class="sf-set set3">
                <div class="sf-box text">
                    <label for="fld1"><span>Upload avatar file:</span>
						<small>
							The allowed image file types are gif, jpeg and png.
						</small>
					</label><br>
                    <span class="fld-input"><input type="file" name="avatar" value="Avatar Image" /></span>
                </div>
            </div>
        </fieldset>
        <div class="frm-buttons">
            <span class="submit"><input type="submit" value="Upload New Image" /> You will be redirected back to this page</span>
        </div>
    </form>
{% endblock %}
